﻿<UserControl x:Class="Vtron.LEDCorrective.Pages.NetworkSetting"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800"
             xmlns:mui="http://firstfloorsoftware.com/ModernUI">
    <UserControl.Resources>
        <Style x:Key="TextBlockStyle" TargetType="TextBlock">
            <Setter Property="HorizontalAlignment" Value="Right"/>
            <Setter Property="Margin" Value="0,0,5,0"/>
            <Setter Property="FontSize" Value="13.333"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>
        <Style x:Key="TextBoxStyle" TargetType="TextBox">
            <Setter Property="Width" Value="350"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Margin" Value="5,3,0,3"/>
            <Setter Property="BorderThickness" Value="0,0,0,1"/>
            <Setter Property="BorderBrush" Value="Black"/>
            <Setter Property="Background" Value="{x:Null}"/>
        </Style>
    </UserControl.Resources>
    <Grid Style="{StaticResource ContentRoot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock x:Name="txt" Text="VLED 逐点校正系统" HorizontalAlignment="Center" FontSize="24" FontWeight="Bold"/>
            <Rectangle Grid.Row="1" RenderTransformOrigin="1,0.5" Height="32" Width="220">
                <Rectangle.Fill>
                    <VisualBrush Visual="{Binding ElementName=txt}" />
                </Rectangle.Fill>
                <Rectangle.RenderTransform>
                    <ScaleTransform ScaleY="-1" />
                </Rectangle.RenderTransform>
                <Rectangle.OpacityMask>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Offset="0.3" Color="Transparent" />
                        <GradientStop Offset="1" Color="#44000000" />
                    </LinearGradientBrush>
                </Rectangle.OpacityMask>
            </Rectangle>
        </Grid>
        <Grid Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock Text="VLED 发送器" Margin="20,20,40,8" FontSize="18"/>
            <Line Grid.Row="1" Height="1" Stretch="Fill" X2="1" Stroke="#cccccc" StrokeDashArray="1, 1"  StrokeThickness="2" Margin="20,0,20,5" />
            <Grid Grid.Row="2" Margin="20,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Grid.Column="0" Text="Ip地址:" Style="{StaticResource TextBlockStyle}"/>
                <TextBox x:Name="ip_txt" Grid.Row="0" Grid.Column="1" Style="{StaticResource TextBoxStyle}"/>
                <TextBlock Grid.Row="0" Grid.Column="2" Text="端口:" Style="{StaticResource TextBlockStyle}"/>
                <TextBox x:Name="port_txt" Grid.Row="0" Grid.Column="3" Style="{StaticResource TextBoxStyle}"/>
                <StackPanel Grid.Row="1" Grid.ColumnSpan="4" Orientation="Horizontal" Margin="5,20" HorizontalAlignment="Right">
                    <Button  x:Name="connect_btn" Content="测试连接" VerticalAlignment="Center" Width="97" Height="26" FontSize="12.333" Click="connect_btn_Click"/>
                </StackPanel>
            </Grid>
        </Grid>
        <Grid Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock Text="视屏信号控制器" Margin="20,20,40,8" FontSize="18"/>
            <Line Grid.Row="1" Height="1" Stretch="Fill" X2="1" Stroke="#cccccc" StrokeDashArray="1, 1"  StrokeThickness="2" Margin="20,0,20,5" />
            <Grid Grid.Row="2" Margin="20,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Grid.Column="0" Text="Ip地址:" Style="{StaticResource TextBlockStyle}"/>
                <TextBox x:Name="ipCtroller_txt" Grid.Row="0" Grid.Column="1" Style="{StaticResource TextBoxStyle}"/>
                <TextBlock Grid.Row="0" Grid.Column="2" Text="端口:" Style="{StaticResource TextBlockStyle}"/>
                <TextBox x:Name="portCtroller_txt" Grid.Row="0" Grid.Column="3" Style="{StaticResource TextBoxStyle}" IsHitTestVisible="False"/>
                <StackPanel Grid.Row="1" Grid.ColumnSpan="4" Orientation="Horizontal" Margin="5,20" HorizontalAlignment="Right">
                    <Button  x:Name="connectCtroller_btn" Content="测试连接" VerticalAlignment="Center" Width="97" Height="26" FontSize="12.333" Click="connectCtroller_btn_Click"/>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
